﻿using ScrapeInterface;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace ConsoleClient
{
    class Program
    {
        static void Main(string[] args)
        {
            Assembly ass = Assembly.Load("ScrapeLib");
            IScrape scraper = null;
            foreach (Type assType in ass.GetTypes())
            {
                if (typeof(IScrape).IsAssignableFrom(assType))
                {
                    scraper = (IScrape)Activator.CreateInstance(assType);
                }
            }
            Console.WriteLine(scraper?.DownLoadHtmlFromUrl("https://baidu.com"));

            List<string> strList1 = new List<string>();

            ConcurrentQueue<int> conQueue = new ConcurrentQueue<int>();

            conQueue.Enqueue(1);

            strList1.Add("123");

            Console.ReadKey();
        }
    }
}
